import {createStore} from 'vuex'

const store = createStore({
    state() {
        return {
            keepAliveList: [],
            viewLoading: false,
            userFirstStatus: false,
        }
    },
    getters: {
        getViewLoading: (state) => {
            return state.viewLoading
        }
    },
    mutations: {
        CHANGE_LOADING: (state, payload) => {
            state.viewLoading = payload
        },
        USER_FIRST_HOME: (state, payload) => {
            state.userFirstStatus = payload
        },
    },
    actions: {
        changeLoading({commit}, payload) {
            commit('CHANGE_LOADING', payload)
        },
    }
})

export default store
